<?
	$nMax = count($this->aDatos[$cTemplateId][aContenido]);
	$nRand = rand(1,$nMax);
	$nItem = getParam('nItem', $nRand);
	
	global $aMenu;
	$ncMenuBis = getParam('ncMenuBis', $aMenu[ncMenu]);
	$lang= $this->getLanguage();
	
	$nAnt = $nItem-1;
	$nAnt = ( $nAnt == 0 )? $nMax : $nAnt;
	
	$nSig = $nItem+1;
	$nSig = ( $nSig > $nMax )? 1 : $nSig;
	$aContenido  = $this->aDatos[$cTemplateId][aContenido][$nItem];
	
	$cClassCopete.= "home_copete";
	if ( $aContenido )
	{
		echo "	<div style='overflow:hidden'>
					<a href='".extractLanguage( $aContenido[cLink], $lang )."'>
						<img src='" . URL_FILES ."imagenes_contenido/". $aContenido[ncContenido]."_home.jpg' width='738' height='365' style='border:none' alt='" . extractLanguage( $aContenido[cdContenido], $lang ) . "' />
					</a>";
		if ( extractLanguage( $aContenido[cDescripcion] ) )
		{
			$cClassCopete.= "_descripcion";
			echo "	<div class='$cClassCopete'><b>" . extractLanguage( $aContenido[cdContenido], $lang ). "</b><br />". extractLanguage( $aContenido[cDescripcion], $lang ) ."</div>";
		}else
			echo "	<div class='$cClassCopete'><b>" . extractLanguage( $aContenido[cdContenido], $lang ). "</b><br />". extractLanguage( $aContenido[cDescripcion], $lang ) ."</div>";
		
		if ( $nMax > 1 )
			echo "	<div class='home_flechas'>
						<div style='float:left'><a href='javascript://void(0);' onclick=\"send('?mo=portal&amp;ac=home_banner&amp;rf=action&ncMenuBis=$ncMenuBis&amp;nItem=$nAnt', refreshElement, 'home_banner');\"><img src='imagenes/home_left.gif' width='40' height='40' style='border:none' alt='<-' /></a></div>
						<div style='float:right'><a href='javascript://void(0);' onclick=\"send('?mo=portal&amp;ac=home_banner&amp;rf=action&ncMenuBis=$ncMenuBis&amp;nItem=$nSig', refreshElement, 'home_banner');\"><img src='imagenes/home_right.gif' width='40' height='40' style='border:none' alt='->' /></a></div>
					</div>";
		
		echo "	</div>";
	}
?>